Micron Document
`:top
`!Memory bound`! refers to a situation in which the time to complete a given `F33f`_`[computational problem`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computational_problem]`_`f is decided primarily by the amount of free `F33f`_`[memory`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computer_memory]`_`f required to hold the working `F33f`_`[data`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Data]`_`f. This is in contrast to algorithms that are `F33f`_`[compute-bound`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Compute-bound]`_`f, where the number of elementary computation steps is the deciding factor.

Memory and computation boundaries can sometimes be traded against each other, e.g. by saving and reusing preliminary results or using `F33f`_`[lookup tables`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Lookup_table]`_`f.

>>Contents

• `F0af`_`[Memory-bound functions and memory functions`#memory-bound-functions-and-memory-functions]`_`f
• `F0af`_`[Using memory-bound functions to prevent spam`#using-memory-bound-functions-to-prevent-spam]`_`f
• `F0af`_`[See also`#see-also]`_`f
• `F0af`_`[References`#references]`_`f
• `F0af`_`[External links`#external-links]`_`f

-─

>>Memory-bound functions and memory functions

Memory-bound `F33f`_`[functions`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Subroutine]`_`f and memory functions are related in that both involve extensive memory access, but a distinction exists between the two.

Memory functions use a `F33f`_`[dynamic programming`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Dynamic_programming]`_`f technique called `F33f`_`[memoization`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Memoization]`_`f in order to relieve the inefficiency of `F33f`_`[recursion`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Recursion]`_`f that might occur. It is based on the simple idea of calculating and storing solutions to subproblems so that the solutions can be reused later without recalculating the `F33f`_`[subproblems`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Optimal_substructure]`_`f again. The best known example that takes advantage of memoization is an `F33f`_`[algorithm`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Algorithm]`_`f that computes the `F33f`_`[Fibonacci numbers`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Fibonacci_number]`_`f. The following `F33f`_`[pseudocode`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Pseudocode]`_`f uses recursion and memoization, and runs in `F33f`_`[linear CPU time`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Linear_time]`_`f:

`B100`F9d9 Fibonacci (n)`f`b
`B100`F9d9 {`f`b
`B100`F9d9 for i = 0 to n-1`f`b
`B100`F9d9 results[i] = -1 // -1 means undefined`f`b
`B100`F9d9`f`b
`B100`F9d9 return Fibonacci_Results (results, n);`f`b
`B100`F9d9 }`f`b
`B100`F9d9`f`b
`B100`F9d9 Fibonacci_Results (results, n)`f`b
`B100`F9d9 {`f`b
`B100`F9d9 if (results[n] != -1) // If it has been solved before,`f`b
`B100`F9d9 return results[n] // look it up.`f`b
`B100`F9d9 if (n == 0)`f`b
`B100`F9d9 val = 0`f`b
`B100`F9d9 else if (n == 1)`f`b
`B100`F9d9 val = 1`f`b
`B100`F9d9 else`f`b
`B100`F9d9 val = Fibonacci_Results(results, n-2 ) + Fibonacci_Results(results, n-1)`f`b
`B100`F9d9 results[n] = val // Save this result for re-use.`f`b
`B100`F9d9`f`b
`B100`F9d9 return val`f`b
`B100`F9d9 }`f`b

Compare the above to an algorithm that uses only recursion, and runs in `F33f`_`[exponential`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Exponential_time]`_`f CPU time:

`B100`F9d9 Recursive_Fibonacci (n)`f`b
`B100`F9d9 {`f`b
`B100`F9d9 if (n == 0)`f`b
`B100`F9d9 return 0`f`b
`B100`F9d9 if (n == 1)`f`b
`B100`F9d9 return 1`f`b
`B100`F9d9`f`b
`B100`F9d9 return Recursive_Fibonacci (n-1) + Recursive_Fibonacci (n-2)`f`b
`B100`F9d9 }`f`b

While the recursive-only algorithm is simpler and more elegant than the algorithm that uses recursion and memoization, the latter has a significantly lower `F33f`_`[time complexity`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Time_complexity]`_`f than the former.

The term "memory-bound function" has only come into use relatively recently, and is used principally to describe a function that uses XOR and consists of a series of computations in which each computation depends on the previous computation. Memory functions have long been an important tool used to improve time complexity, but memory-bound functions have seen far fewer applications.

>>Using memory-bound functions to prevent spam

Memory-bound functions might be useful in a `F33f`_`[proof-of-work system`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Proof_of_work]`_`f that could deter `F33f`_`[spam`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Spamming]`_`f, which has become a problem of epidemic proportions on the `F33f`_`[Internet`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Internet]`_`f.

In 1992, IBM research scientists `F33f`_`[Cynthia Dwork`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Cynthia_Dwork]`_`f and `F33f`_`[Moni Naor`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Moni_Naor]`_`f published a paper at CRYPTO 1992 titled `*Pricing via Processing or Combatting Junk Mail`*,`:cite-ref-1[`F5bf`_`[1`#cite-note-1]`_`f] suggesting a possibility of using `F33f`_`[CPU-bound`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=CPU-bound]`_`f functions to deter abusers from sending spam. The scheme was based on the idea that computer users are much more likely to abuse a resource if the cost of abusing the resource is negligible: the underlying reason spam has become so rampant is that sending an `F33f`_`[e-mail`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=E-mail]`_`f has minuscule cost for spammers.

Dwork and Naor proposed that spamming might be reduced by injecting an additional cost in the form of an expensive `F33f`_`[CPU`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=CPU]`_`f computation: CPU-bound functions would consume CPU resources at the sender's machine for each message, thus preventing huge amounts of spam from being sent in a short period.

The basic scheme that protects against abuses is as follows:
Given a Sender, a Recipient, and an email Message. If Recipient has agreed beforehand to receive e-mail from Sender, then Message is transmitted in the usual way. Otherwise, Sender computes some function `*G(Message)`* and sends `*(Message, G(Message))`* to Recipient. Recipient checks if what it receives from Sender is of the form `*(Message, G(Message))`*. If yes, Recipient accepts Message. Otherwise, Recipient rejects Message.

The function `*G()`* is selected such that the verification by Recipient is relatively fast (e.g., taking a millisecond) and such that the computation by Sender is somewhat slow (involving at least several seconds). Therefore, Sender will be discouraged from sending Message to multiple recipients with no prior agreements: the cost in terms of both time and computing resources of computing `*G()`* repeatedly will become very prohibitive for a spammer who intends to send many millions of e-mails.

The major problem of using the above scheme is that fast CPUs compute much faster than slow CPUs. Further, higher-end computer systems also have sophisticated pipelines and other advantageous features that facilitate computations. As a result, a spammer with a state-of-the-art system will hardly be affected by such deterrence while a typical user with a mediocre system will be adversely affected. If a computation takes a few seconds on a new `F33f`_`[PC`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Personal_computer]`_`f, it may take a minute on an old PC, and several minutes on a `F33f`_`[PDA`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Personal_digital_assistant]`_`f, which might be a nuisance for users of old PCs, but probably unacceptable for users of PDAs. The disparity in client CPU speed constitutes one of the prominent roadblocks to widespread adoption of any scheme based on a CPU-bound function. Therefore, researchers are concerned with finding functions that most computer systems will evaluate at about the same speed, so that high-end systems might evaluate these functions somewhat faster than low-end systems (2–10 times faster, but not 10–100 times faster) as CPU disparities might imply. These ratios are "`F33f`_`[egalitarian`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Egalitarian]`_`f" enough for the intended applications: the functions are effective in discouraging abuses and do not add a prohibitive delay on legitimate interactions, across a wide range of systems.

The new egalitarian approach is to rely on memory-bound functions. As stated before, a memory-bound function is a function whose computation time is dominated by the time spent accessing memory. A memory-bound function accesses locations in a large region of memory in an unpredictable way, in such a way that using caches are not effective. In recent years, the speed of CPU has grown drastically, but there has been comparatively small progress in developing faster main memory. Since the `F33f`_`[ratios`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Ratio]`_`f of `F33f`_`[memory latencies`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Memory_latency]`_`f of machines built in the last five years is typically no greater than two, and almost always less than four, the memory-bound function will be egalitarian to most systems for the foreseeable future.

>>See also

• `F33f`_`[Computer architecture`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computer_architecture]`_`f
• `F33f`_`[CPU-bound`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=CPU-bound]`_`f
• `F33f`_`[Dynamic programming`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Dynamic_programming]`_`f
• `F33f`_`[I/O-bound`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=I/O_bound]`_`f
• `F33f`_`[Memoization`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Memoization]`_`f
• `F33f`_`[Memory-hard function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Memory-hard_function]`_`f
• `F33f`_`[Optimal substructure`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Optimal_substructure]`_`f
• `F33f`_`[Proof of work`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Proof_of_work]`_`f
• `F33f`_`[Recursion`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Recursion]`_`f
• `F33f`_`[Memory bottleneck`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Memory_bottleneck]`_`f

>>References

`:cite-note-1`!1.`! `F0af`_`[↑`#cite-ref-1]`_`f `:citerefdworknaor1992`a`F33f`_`[Dwork, Cynthia`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Cynthia_Dwork]`_`f; `F33f`_`[Naor, Moni`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Moni_Naor]`_`f (1992). "Pricing via Processing or Combatting Junk Mail". `*Advances in Cryptology — CRYPTO' 92`*. Lecture Notes in Computer Science. Vol. 740. pp. 139–147. `F33f`_`[doi`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Doi_(identifier)]`_`f:10.1007/3-540-48071-4_10. `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 978-3-540-57340-1. (updated version of same)

• Abadi, M., Burrows, M., Manasse, M., & Wobber, T. (2005, May). Moderately Hard, Memory-bound Functions, `*ACM Transactions on Internet Technology`*.
• Dwork, C., Goldberg, A., & Naor, M. (2003). On Memory-Bound Functions for Fighting Spam, `*Advances in Cryptology`*.
• Hellman, M. E. (1980). A Cryptanalytic Time-Memory Trade Off, `*IEEE Transactionson Information Theory`*.

>>External links

• Implementation of a Memory Bound function
• Computer Architecture
• How Computer Memory Works
• Dynamic Programming
• CPU Bound vs. I/O Bound
• Spam – FTC Consumer Information

`c`F0af`_`[↑ Back to top`#top]`_`f`a